from django.contrib import admin
from .models import *


# Register your models here.
@admin.register(Publisher)
class PublisherAdmin(admin.ModelAdmin):
    list_display = ('name', 'address', 'city', 'state_province', 'country', 'website')
    search_fields = ('name',)
    list_filter = ('city',)
    # fields = ('name', 'city',)
    # exclude = ('name', 'city',)
    fieldsets = (
        (None, {
            'fields': ('name', 'address',)
        }),
        ('Advanced options', {
            'classes': ('collapse',),
            'fields': ('country', 'website'),
        }),
    )


admin.site.register(Article)
# admin.site.register(Publisher, PublisherAdmin)
admin.site.register(Author)
admin.site.register(AuthorDetail)
admin.site.register(Book)
